<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var then = new Date(2011, 0, 1);
    console.info(then)
    var later = new Date(2011, 0, 1, 17, 10, 30);
    console.info(later)
    var now = new Date();
    console.info(now);
    var elapsed = now - then;
    console.info(elapsed);
    console.info(now.getFullYear());
    console.info(now.getMonth());
    console.info(now.getDate());
    console.info(now.getDay());
    console.info(now.getHours());

</script>

</body>
</html>